<!DOCTYPE html>
<!-- saved from url=(0042)https://v3.bootcss.com/examples/dashboard/ -->
<html lang="zh-CN">
<head>

    <title>用户注册</title>
    <!-- Bootstrap core CSS -->
    <link href="/static/bootstrap/css/bootstrap.min.css" rel="stylesheet">

    <!--页面使用的自定义CSS-->
    <link href="/static/bootstrap/css/dashboard.css" rel="stylesheet">
</head>

<body>


<div class="container-fluid">
    <div class="row">
        {#        一种方式取值#}
        {#           {{ form_obj.as_p }}#}
        <div class="col-md-4 col-md-offset-4">
            <div class="panel panel-success">
                <div class="panel-heading">
                    <h3 class="panel-title">用户注册</h3>
                </div>
                <div class="panel-body">
                    <form class="form-horizontal" novalidate action="/reg.html" method="post" >
                        {% csrf_token %}
                        <div class="form-group">
                            <label for="{{ form_obj.username.id_for_label }}"
                                   class="col-sm-4 control-label">{{ form_obj.username.label }}</label>
                            <div class="col-sm-5">
                                {{ form_obj.username }}
                                <span class="help-block">{{ form_obj.username.errors.0 }}</span>
                            </div>
                        </div>

                        <div class="form-group">
                            <label for="{{ form_obj.password.id_for_label }}"
                                   class="col-sm-4 control-label">{{ form_obj.password.label }}</label>
                            <div class="col-sm-5">
                                {{ form_obj.password }}
                                <span class="help-block">{{ form_obj.password.errors.0 }}</span>
                            </div>
                        </div>


                        <div class="form-group">
                            <label for="{{ form_obj.re_password.id_for_label }}"
                                   class="col-sm-4 control-label">{{ form_obj.re_password.label }}</label>
                            <div class="col-sm-5">{{ form_obj.re_password }}
                                <span class="help-block">{{ form_obj.re_password.errors.0 }}</span>
                            </div>
                        </div>
                        <div class="form-group">
                            <label for="{{ form_obj.email.id_for_label }}"
                                   class="col-sm-4 control-label">{{ form_obj.email.label }}</label>
                            <div class="col-sm-5">
                                {{ form_obj.email }}
                                <span class="help-block">{{ form_obj.email.errors.0 }}</span>
                            </div>
                        </div>

                        <div class="form-group">
                            <div class="col-sm-1 col-sm-offset-4">
                                <button type="submit" class="btn btn-success">注册</button>
                            </div>
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>
</div>
<script src="/static/jquery-3.3.1.js"></script>
<script src="/static/bootstrap/js/bootstrap.min.js"></script>
</body>
</html>
